package Level01;

import java.util.Calendar;

public class Three {
    public static void main(String[] args) {
        //获取当前日历对象
        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar.getTime());
        //调用日期对象的 add()方法,让当前日历向后移动 500 天
        calendar.add(Calendar.DATE,500);
        System.out.println(calendar.getTime());
        //获取日历中的年,月,日
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH);
        int date = calendar.get(Calendar.DATE);
        System.out.println(year+"-"+month+"-"+date);

    }
}
